//
//  FMCell.m
//  LastTemp
//
//  Created by dllo on 15/4/23.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "FMCell.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation FMCell
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.picImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
        [self.contentView addSubview:self.picImageView];
        [_picImageView release];
        
        self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH/2-50, 30, 100, 30)];
        self.nameLabel.textAlignment = NSTextAlignmentCenter;
        self.nameLabel.textColor = [UIColor whiteColor];

        [self.picImageView addSubview:self.nameLabel];
        [_nameLabel release];
        
        self.countLabel = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH/2-45, 65, 90, 20)];
        self.countLabel.textColor = [UIColor whiteColor];
        self.countLabel.textAlignment = NSTextAlignmentCenter;
        [self.picImageView addSubview:self.countLabel];
        [_countLabel release];
        
//        self.smallImageView = [[UIImageView alloc] initWithFrame:CGRectMake(120, 70, 30, 30)];
//        [self.picImageView addSubview:self.smallImageView];
//        [_smallImageView release];
    }
    return self;
}
- (void)dealloc
{
    [_picImageView release];
    [_smallImageView release];
    [_nameLabel release];
    [_countLabel release];
    [super dealloc];
}
@end
